package top.kaoshanji.p1ch05a;

/**
 * 代码清单-p1ch05a-096页a：字符串作为选择器
 * author kaoshanji
 * ^_^
 * create time 2025/3/7 19:18
 */
public class StringSwitch {

    public static void main(String[] args) {
        String color = "red";

        switch (color) {
            case "red":
                System.out.println("RED");
                break;
            case "green":
                System.out.println("GREEN");
                break;
            case "blue":
                System.out.println("BLUE");
                break;
            case "yellow":
                System.out.println("YELLOW");
                break;
            default:
                System.out.println("Unknown");
                break;

        }

    }



}
